home *** CD-ROM | disk | FTP | other *** search
- #include "Shell.Extra.h"
- #include "Shell.Check.h"
-
-
- static void Shell_MakeIconBorder( icon_block *iconblock, char *valid)
- {
- static char nulltext[2] = "\0";
-
- iconblock->flags.value |= icon_TEXT | icon_BORDER | icon_INDIRECTED;
-
- iconblock->data.indirecttext.buffer = nulltext;
- iconblock->data.indirecttext.bufflen = 2;
-
- iconblock->data.indirecttext.validstring = valid;
- }
-
-
-
-
- void Shell_ResizeIconRect( Shell_rectblock *r)
- /* Makes a rect's icon-rect the appropriate size */
- /* for the rect's rect. */
- /* When redrawing rects, the iconrect is checked */
- /* against the redraw rect so that any icon-border */
- /* is redrawn correctly. */
- {
- /* should check for what type of borer the icon has - these values are ok for
- slab in/out, but don't work for e.g. for r5 (default action button)
- */
- r->icon.workarearect = r->rect;
- if ( r->plot_icon) {
- r->icon.workarearect.min.x -= 2*Shell_PIXELXSIZE;
- r->icon.workarearect.min.y -= 2*Shell_PIXELYSIZE;
- r->icon.workarearect.max.x += 2*Shell_PIXELXSIZE;
- r->icon.workarearect.max.y += 2*Shell_PIXELYSIZE;
- }
-
- Shell_CheckWindSizeAndRedraw( r->window, &r->icon.workarearect);
-
- }
-
-
-
-
- void Shell_MakeRectIcon( Shell_rectblock *r, int forecol, int backcol, char *valid)
- {
- r->plot_icon = TRUE;
- r->icon.flags.value = 0;
- r->icon.flags.data.foreground = forecol;
- r->icon.flags.data.background = backcol;
- r->icon.flags.data.filled = ( backcol != colour_TRANSPARENT) ? TRUE : FALSE;
- Shell_MakeIconBorder( &r->icon, valid);
- Shell_ResizeIconRect( r);
- }
-
-
-
-
-